1 package jrre.instructionset.pop.localvariable;
2
3 import jrre.*;
4 import jrre.types.*;
5
6 public class IAStore extends jrre.instructionset.Instruction {
7
8 public IAStore(){
9
10 name = "iastore ";
11 description = "foo foo moo poo";
12 length = 0;
13 }
14
15 /***
16 * Executes the <strong><code>iastore</code></strong> instruction.
17 *
18 */
19 public void execute(){
20
21 PrimitiveType value = (PrimitiveType)Stack.popOperand();
22 PrimitiveType index = (PrimitiveType)Stack.popOperand();
23 ReferenceType arrayRef = (ReferenceType)Stack.popOperand();
24
25 ArrayInstance array = (ArrayInstance)arrayRef.getValue();
26 array.setElement(index.getValue(), value);
27 }
28
29 public String toString(){
30 StringBuffer toReturn = new StringBuffer();
31 toReturn.append("iastore");
32 return toReturn.toString();
33 }
34 }
This page was automatically generated by Maven